/**
 * 渠道配置管理
 */
import request from '@/utils/request';

// 列表数据查询
export function queryChannelList(query: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/channelMapping',
		method: 'post',
		data: query,
	});
}

// 根据id查询
export function queryChannelById(id: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/channelMapping/' + id,
		method: 'get',
	});
}

// 新增渠道
export function addChannel(query: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/channelMapping/save',
		method: 'post',
		data: query,
	});
}

// 修改渠道
export function editChannel(query: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/channelMapping',
		method: 'put',
		data: query,
	});
}

// 批量删除
export function deleteChannelByIds(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/channelMapping/delete/' + ids,
		method: 'delete',
	});
}
